home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 February: Technology Seed / Mac Tech Seed Feb '97.toast / ODF Release 3 / ODFDev / Draw / Sources / TextShp.h < prev    next >
Encoding:
Text File  |  1996-12-16  |  2.3 KB  |  104 lines  |  [TEXT/MPS ]

  1. //========================================================================================
  2. //
  3. //    File:                TextShp.h
  4. //    Release Version:    $ ODF 3 $
  5. //
  6. //    Author:                Henri Lamiraux
  7. //
  8. //    Copyright:    (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  9. //
  10. //========================================================================================
  11.  
  12. #ifndef TEXTSHP_H
  13. #define TEXTSHP_H
  14.  
  15. #ifndef CONSTANT_H
  16. #include "Constant.h"
  17. #endif
  18.  
  19. #ifndef BASESHP_H
  20. #include "BaseShp.h"
  21. #endif
  22.  
  23. #ifndef BOUNDSHP_H
  24. #include "BoundShp.h"
  25. #endif
  26.  
  27. // ----- Framework Layer -----
  28.  
  29. #ifndef FWSELECT_H
  30. #include "FWSelect.h"
  31. #endif
  32.  
  33. // ----- OS Layer -----
  34.  
  35. #ifndef FWINK_H
  36. #include "FWInk.h"
  37. #endif
  38.  
  39. #ifndef FWSTYLE_H
  40. #include "FWStyle.h"
  41. #endif
  42.  
  43. #ifndef FWPOINT_H
  44. #include "FWPoint.h"
  45. #endif
  46.  
  47. #ifndef FWRECT_H
  48. #include "FWRect.h"
  49. #endif
  50.  
  51. // ----- Foundation Layer -----
  52.  
  53. #ifndef FWRUNTYP_H
  54. #include "FWRunTyp.h"
  55. #endif
  56.  
  57. //========================================================================================
  58. // Forward Declarations
  59. //========================================================================================
  60.  
  61. class CDrawFacetClipper;
  62.  
  63. //========================================================================================
  64. // class CTextShape
  65. //========================================================================================
  66.  
  67. class CTextShape : public CBoundedShape
  68. {
  69. public:
  70.     FW_DECLARE_CLASS
  71.     FW_DECLARE_AUTO(CTextShape)
  72.  
  73. public:
  74.     CTextShape(CDrawPart* drawPart);
  75.     CTextShape(CDrawPart* drawPart, FW_CReadableStream& archive);
  76.     
  77. public:
  78.     virtual ~CTextShape();
  79.  
  80. public:        
  81.     // ----- Archiving -----
  82.     static void*         Read(FW_CReadableStream& stream, FW_ClassTypeConstant type);
  83.     virtual void        Flatten(FW_CWritableStream& archive);
  84.     
  85.     // ----- Shape -----
  86.     virtual ODShape*    CalcClipShape(Environment* ev);
  87.     virtual ODShape*    CreateShapeOutline(Environment *ev);
  88.     
  89.     virtual FW_Boolean    HitTest(Environment *ev, FW_CGraphicContext& gc, const FW_CMouseEvent& theMouseEvent) const;
  90.     virtual void        RenderShape(Environment* ev, ODFacet* facet, FW_CGraphicContext& gc);
  91.  
  92.     // ----- Scripting -----
  93.     virtual ODDescType    GetObjectClass() const;
  94.     
  95. protected:
  96.     CTextShape(unsigned short shapeType, unsigned short renderVerb);
  97.  
  98. private:
  99.     virtual void         OutlineShape(FW_CGraphicContext& gc, const FW_CInk& ink, const FW_CStyle& style, const FW_CRect& rect);
  100.     FW_CString            fText;
  101. };
  102.  
  103. #endif
  104.